using GetStartedApp.Models;
using System.Collections.Generic;
using System.Collections.ObjectModel;

namespace GetStartedApp.ViewModel.Page
{
    public partial class TreeViewPageViewModel : ViewModelBase
    {
        public TreeViewPageViewModel()
        {
            League = new ObservableCollection<Conference>(FillLeague());
        }

        public ObservableCollection<Conference> League { get; }

        private List<Conference> FillLeague()
        {
            return
            [
                new Conference()
                {
                    ConferenceName = "Eastern",
                    Teams =
                    {
                        new Team() { TeamName = "Eastern Team A" },
                        new Team()
                        {
                            TeamName = "Eastern Team B",
                            Players =
                            {
                                new Person() { FirstName = "Player 1" },
                                new Person() { FirstName = "Player 2" },
                                new Person() { FirstName = "Player 3" }
                            }
                        },
                        new Team() { TeamName = "Eastern Team C" }
                    }
                },

                new Conference()
                {
                    ConferenceName = "Western",
                    Teams =
                    {
                        new Team() { TeamName = "Western Team A" },
                        new Team() { TeamName = "Western Team B" },
                        new Team() { TeamName = "Western Team C" }
                    }
                }
            ];
        }
    }
}